/*************************************************************************
 *        >      File Name: configini.h
 *        >    Description:   This file is head file of configini.c .
 *
 *        >         Author: Yang Xiaohan
 *        >           Mail: yangxiaohan_niki@163.com
 *        >   Created Time: Fri 22 Jul 2022 11:58:20 CST
 *        >   Changed Time: Fri 22 Jul 2022 11:58:20 CST
 *************************************************************************/
#ifndef _MQTT_CONF_H_
#define _MQTT_CONF_H_

#define SIZE 			1024
#define KEEP_ALIVE		60

enum{

	SUB ,
	PUB 
};

typedef struct mqtt_user_data
{
	char		brokeraddress[SIZE];
	int 		brokerport;
	char		username[SIZE];
	char		password[SIZE];
	char		clientid[SIZE];
	char 		topic[SIZE];
	int			QOS;

	char		method[SIZE];
	char		time[SIZE];
	char		id[SIZE];
	char		identifier[SIZE];
	char		version[SIZE];
	char		type[SIZE];
	char		state[SIZE];
	char		clientToken[SIZE];
}user_data;



int get_config(char *path,user_data *mqtt,int mode);

#endif


